package mapping;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import pojo.Fund;
import pojo.User;
import pojo.Worth;

public interface UserMapper {

	public Fund selectFundsByName(String name);
	public Fund selectFundsByCode(int code);
	public User selectManagersById(int id);
	public List<Worth> selectWorthsByCode(int code);
	public List<User> selectManagersByCode(int code);
	public List<Fund> getAllFunds();
	public void insertOneFund(Fund fund);
	public void insertOneWorth(Worth worth);
	public void insertOneManager(User manager);
	public void deleteManager(User manager);
	public void deleteManagerByCode(int code);
	public void deleteWorthByCode(int code);
	public void deleteFundByCode(int code);
	public void updateFundName(Fund fund);
	
	public static String getDate() {
		Date d = new Date();
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		String date = df.format(d);
		return date;
	}
}
